There is hollywood physics. Along these lines, I came up with the following definition:
Hollywood Haptics: Immersive tactile experiences that add a touch of reality to stories and games, even if it is not always mathematically accurate.
The image above shows a 4x4 grid of 16 different kinds of textures. If you were able to feel these textures, the metallic looking textures would probably have a way different touch to it than the more sandy ones.
In order to quickly extract a haptic waveform from a 2D texture, I wrote a script that calculates a short haptic wave.
The script:
- takes a 1px strip of the width of the texture
- applies a grayscale
- calculates the wave based on this 1 dimensional strip
- does some normalization
For example, the right upper texture would generate an haptic profile like
Whereas this texture would generate something a little softer:
If you play this haptic waveform on a haptic device, you will need to consider the speed of your finger that is moving over the texture. Let's say that the waveform is generated with a 0.25 m/s speed in mind, moving your finger faster should increase the playback speed, similarly, a slower speed should decrease the playback speed.
Similar to graphic mipmaps, where a graphic mipmap is a series of progressively lower-resolution images used for efficient rendering at varying distances, haptic mipmaps have the potential to store various profiles, each with different resolutions, depending on the speed.
git clone https://robinkrens.nl/repo/haptic-extractor